<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>管理后台</title>

		<link rel="stylesheet" type="text/css" href="./plugins/easyui//themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="./plugins/easyui/themes/icon.css">

		<script type="text/javascript" src="./plugins/easyui/jquery.min.js"></script>
		<script type="text/javascript" src="./plugins/easyui/jquery.easyui.min.js"></script>


		<script type="text/javascript">
			function addTab(title) {
				if ($('#tab-container').tabs('exists', title)) {
					$('#tab-container').tabs('select', title);
				} else {
				 
				 var model="";
				 if("用户管理"==title){
					 model="customers";
				 }else if("菜类管理"==title){
					  model="foodType";
				 }else if("菜品管理"==title){
					 model="food";
				}
				 var content = '<iframe scrolling="auto" frameborder="0" src="http://192.168.150.176:8848/Admin/'+model+'/list.html" style="width:100%;height:100%;"></iframe>';
					$('#tab-container').tabs('add', {
						title: title,
						content: content,
						closable: true
					});
				}
			}

			$(function() {

				var data = [{
					text: '系统管理',
					iconCls: 'fa fa-wpforms',
					state: 'open',
					children: [{
						text: '菜类管理'
					}, {
						text: '菜品管理'
					}, {
						text: '用户管理'
					}]
				}, {
					text: '产品中心',
					iconCls: 'fa fa-at',
					selected: true,
					children: [{
						text: '联系方式'
					}, {
						text: '功能正在增加'
					}]
				}];


				$('#left').sidemenu({
					data: data,
					width: 200,
					border: false,
					multiple: false,
					onSelect: function(item) {
						var title = item.text;
						//添加tab
						addTab(title);
					}
				});
			})
		</script>

	</head>

	<body class="easyui-layout">
		<div data-options="region:'north',border:false" style="height:60px;background:#B3DFDA;padding:10px">
			订餐管理后台
		</div>

		<div data-options="region:'west',split:true,title:'菜单导航'" style="width:200px;">
			<div id="left" style="width:300px"></div>
		</div>

		<div data-options="region:'center',title:'内容'">

			<div id="tab-container" class="easyui-tabs" style="height:500px;">
				<div title="首页" style="padding:20px">
					<p><img src="img/slider2.jpg" ></p>
				</div>
			</div>

		</div>

		<div data-options="region:'south',border:false" style="height:50px;background:#A9FACD;padding:10px;">
			内容区域
		</div>
	</body>

</html>
